﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LearningCompany_DAO
{
    public partial class Theme
    {
        #region Attributs et accesseurs

        #endregion

        #region Constructeurs

        #endregion

        #region Méthodes
        public static List<Theme> GetListeInstances()
        {
            return (from oTheme in ContexteDAO.ContexteDonnees.Theme
                    orderby oTheme.Libelle
                    select oTheme).ToList();
        }

        public static Theme GetInstance(int aIdentifiant)
        {
            return (from oTheme in ContexteDAO.ContexteDonnees.Theme
                    where oTheme.Identifiant == aIdentifiant
                    orderby oTheme.Libelle
                    select oTheme).FirstOrDefault();
        }

        public List<Formation> GetListeFormations()
        {
            return (from oFormation in this.Formations
                    orderby oFormation.Libelle
                    select oFormation).ToList();
        }
        #endregion
    }
}
